#include "stdafx.h"
#include "sum_handler.h"

sum_handler::sum_handler(void)
	:sum(0)
{
}


sum_handler::~sum_handler(void)
{
}

void sum_handler::handle_word(string& word)
{
	//cout<<"["<<word.c_str()<<"]"<<endl;
	sum += atof(word.c_str());
}

void sum_handler::display_all()
{
	cout<<sum<<endl;
}